import { createI18n } from 'vue-i18n'
import en from './en'
import zh from './zh'

const i18n = createI18n({
  locale: localStorage.getItem('lang') || 'zh-CN',
  legacy: false,
  globalInjection: true,
  warnHtmlMessage: false,
  messages: {
    en,
    'zh-CN': zh
  }
})

export default i18n
